package com.homework.data0318.work1;

public class Car {

    String name;
    int sum;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSum() {
        return sum;
    }

    public void setSum(int sum) {
        this.sum = sum;
    }

    public void by(){
        System.out.println(this.name+"正在驾驶");
    }
    public void brking(){
        System.out.println(this.name+"按"+this.sum+"次喇叭");
    }
    public void brking(String name){
        System.out.println(this.name+"按"+this.sum+"次喇叭");
    }

}
